A semiconductor device with an overcurrent protection circuit such as one disclosed in Japanese Patent Laid-Open No. 2013-77976 is known. Semiconductor devices such as inverters each having a semiconductor switching element (hereinafter referred to simply as “switching element”) include ones having an overcurrent protection circuit for protecting the switching element by performing a protecting operation such as shutting off the switching element when a main current flowing through the switching element exceeds a certain level.
Methods for detecting a main current flowing through a switching element include a method of causing part of the main current to flow as a shunt current through an element (cell) for current detection connected in parallel with the switching element and detecting the shunt current (sense current).
The current sense element has the same cell structure as the switching element, is connected in parallel with the switching element and has a certain cell area with respect to the switching element. In general, in semiconductor devices adopting a system using such a current sense element, the size and electrical characteristics of the current sense element are set so that the ratio of the sense current to the main current in the switching element (shunt ratio) is about 1/1000 to 1/100000.
The sense current is converted into a voltage (sense voltage), for example, by using a resistor, and the sense voltage is input to the overcurrent protection circuit. When the sense voltage exceeds a predetermined threshold voltage, the overcurrent protection circuit determines that an overcurrent has flowed through the switching element and performs a protecting operation such as shutting off the switching element, thereby preventing damage to the switching element. The value of the main current through the switching element at which the overcurrent protection circuit starts the protecting operation is called a short-circuit protection trip level (hereinafter referred to as “SC trip level”).
A device according to Japanese Patent Laid-Open No. 2008-206348 has an overcurrent protection circuit capable of adjusting the SC trip level without changing a reference voltage. More specifically, a correction current is supplied to the sense resistor. When the correction current is supplied to the sense resistor, the sense current is increased in accordance with a relationship: sense voltage=sense resistor×(sense current+correction current). As a result, the overcurrent protection circuit operates at a lower corrector current in comparison with the case where no correction current is supplied. If the direction of flow of the correction current is reversed, the operating level of the overcurrent protection circuit can be increased.
When the element temperature of the switching element varies, the SC trip level varies. That is, there is an SC trip level-temperature characteristic. In this respect, in the device according to Japanese Patent Laid-Open No. 2008-206348, the correction current is changed in proportion to the element temperature of the switching element so that the SC trip level is constantly maintained even when the element temperature varies. A semiconductor device capable of adjusting the operating level of the overcurrent protection circuit is thus obtained.